home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-01-06 | 2.0 KB | 72 lines | [TEXT/EDIT] |
- // textEdit.h
- // © Copyright 1984 Consulair Corp, All Rights Reserved.
- // Portions © Copyright Apple Computer, Inc: 1982, 1983, 1984
- // Stanford University, SUMEX project: 1984
- // Requires Macdefs.h Quickdraw.h Window.h
-
- #ifndef TextEditLoaded
-
- #ifndef WindowLoaded
- #include "window.h"
- #endif
- #define TextEditLoaded
-
- /* add constants for justification */
-
- #define teJustLeft 0
- #define teJustCenter 1
- #define teJustRight -1
-
- // TextEdit
-
- struct __TE
- {
- Rect destRect;
- Rect viewRect;
- Rect selRect; // select rectangle
- short lineHeight; // current font lineheight
- short firstBL; // current first baseline offset
- Point selPoint; // selection point (mouseLoc)
- short selStart;
- short selEnd;
- short active; // nonzero if active
- long wordBreak; // wordbreak routine
- long clikLoop; // clickloop routine
- long clickTime; // time of 1st click
- short clickLoc; // char location of click
- long caretTime; // time for next caret blink
- short caretState;
- short just; // fill style
- short telength; // length of text below
- Handle hText; // handle to actual text
- short recalBack; // nonzero if recal in backround
- short recalLines; // line being recaled
- short clikStuff; // internal clickstuff
- short crOnly; // -1 if CR line breaks only
- short txFont;
- Style txFace;
- short txMode;
- short txSize;
- GrafPtr inPort; // the grafport
- Ptr highHook; // highlighting hook
- Ptr caretHook;
- short nLines;
- short lineStarts[1]; // actual linestarts
- };
-
- #define TERec struct __TE
- typedef TERec *TEPtr;
- typedef TEPtr *TEHandle;
-
- // Functions returning other than integer
-
- #define TEGetText (Handle)TEGetText
- #define TENew (TEHandle)TENew
-
- // change two fields of the TERec data structure from "corrections.h"
-
- #define teLength telength
- #define fontAscent firstBL
-
- #endif
-